package day03.homework.standard;

public class LuoJiOper3 {
    public static void main(String[] args) {
        System.out.println("1.声明三个整型变量，演示&&和||，演示!  2.演示短路&&与短路||");
        int a = 5, b = 2, d = 7;
        System.out.println("演示&&:true+false、false+true、true+true、false+false,短路&&");
        System.out.println(a > b && b > d);// true+false=false
        System.out.println(a > d && b < d);// false+true=false短路
        System.out.println(b <= a && d >= a);// true+true=true
        System.out.println(b >= a && d <= a);// false+false=false短路

        System.out.println("演示||:true+false、false+true、true+true、false+false,短路||");
        System.out.println(b <= a || a >= d);// true+false = true短路
        System.out.println(b >= d || d >= a);// false+true = true
        System.out.println(b <= a || d >= a);// true+true = true短路
        System.out.println(b >= a || d <= a);// false+false=false

        System.out.println("演示!:true、false");
        System.out.println(!(a>=b));// !true=false
        System.out.println(!(a<=b));// !false=true


    }
}
